Optimal. Leaf size=181 \[ -\frac {2 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f}+\frac {2 (b c+3 a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{3 d f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {2 b \left (c^2-d^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{3 d f \sqrt {c+d \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 181, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2832, 2831,
2742, 2740, 2734, 2732} \begin {gather*} \frac {2 (3 a d+b c) \sqrt {c+d \sin (e+f x)} E\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{3 d f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {2 b \left (c^2-d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}} F\left (\frac {1}{2} \left (e+f x-\frac {\pi }{2}\right )|\frac {2 d}{c+d}\right )}{3 d f \sqrt {c+d \sin (e+f x)}}-\frac {2 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2732
Rule 2734
Rule 2740
Rule 2742
Rule 2831
Rule 2832
Rubi steps
\begin {align*} \int (a+b \sin (e+f x)) \sqrt {c+d \sin (e+f x)} \, dx &=-\frac {2 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f}+\frac {2}{3} \int \frac {\frac {1}{2} (3 a c+b d)+\frac {1}{2} (b c+3 a d) \sin (e+f x)}{\sqrt {c+d \sin (e+f x)}} \, dx\\ &=-\frac {2 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f}+\frac {(b c+3 a d) \int \sqrt {c+d \sin (e+f x)} \, dx}{3 d}-\frac {\left (b \left (c^2-d^2\right )\right ) \int \frac {1}{\sqrt {c+d \sin (e+f x)}} \, dx}{3 d}\\ &=-\frac {2 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f}+\frac {\left ((b c+3 a d) \sqrt {c+d \sin (e+f x)}\right ) \int \sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}} \, dx}{3 d \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {\left (b \left (c^2-d^2\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right ) \int \frac {1}{\sqrt {\frac {c}{c+d}+\frac {d \sin (e+f x)}{c+d}}} \, dx}{3 d \sqrt {c+d \sin (e+f x)}}\\ &=-\frac {2 b \cos (e+f x) \sqrt {c+d \sin (e+f x)}}{3 f}+\frac {2 (b c+3 a d) E\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {c+d \sin (e+f x)}}{3 d f \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}-\frac {2 b \left (c^2-d^2\right ) F\left (\frac {1}{2} \left (e-\frac {\pi }{2}+f x\right )|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}}{3 d f \sqrt {c+d \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.68, size = 152, normalized size = 0.84 \begin {gather*} -\frac {2 \left (b d \cos (e+f x) (c+d \sin (e+f x))+(c+d) (b c+3 a d) E\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}-b \left (c^2-d^2\right ) F\left (\frac {1}{4} (-2 e+\pi -2 f x)|\frac {2 d}{c+d}\right ) \sqrt {\frac {c+d \sin (e+f x)}{c+d}}\right )}{3 d f \sqrt {c+d \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(861\) vs.
\(2(231)=462\).
time = 5.78, size = 862, normalized size = 4.76
method | result | size |
default | \(\frac {2 a \,c^{2} \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) d -2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) a \,d^{3}+\frac {2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) b \,c^{2} d}{3}-\frac {2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticF \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) b \,d^{3}}{3}-2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) a \,c^{2} d +2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) a \,d^{3}-\frac {2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) b \,c^{3}}{3}+\frac {2 \sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}\, \sqrt {-\frac {\left (-1+\sin \left (f x +e \right )\right ) d}{c +d}}\, \sqrt {-\frac {d \left (1+\sin \left (f x +e \right )\right )}{c -d}}\, \EllipticE \left (\sqrt {\frac {c +d \sin \left (f x +e \right )}{c -d}}, \sqrt {\frac {c -d}{c +d}}\right ) b c \,d^{2}}{3}+\frac {2 b \,d^{3} \left (\sin ^{3}\left (f x +e \right )\right )}{3}+\frac {2 b c \,d^{2} \left (\sin ^{2}\left (f x +e \right )\right )}{3}-\frac {2 b \,d^{3} \sin \left (f x +e \right )}{3}-\frac {2 b c \,d^{2}}{3}}{d^{2} \cos \left (f x +e \right ) \sqrt {c +d \sin \left (f x +e \right )}\, f}\) | \(862\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.12, size = 453, normalized size = 2.50 \begin {gather*} -\frac {6 \, \sqrt {d \sin \left (f x + e\right ) + c} b d^{2} \cos \left (f x + e\right ) + \sqrt {2} {\left (2 \, b c^{2} - 3 \, a c d - 3 \, b d^{2}\right )} \sqrt {i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right ) + \sqrt {2} {\left (2 \, b c^{2} - 3 \, a c d - 3 \, b d^{2}\right )} \sqrt {-i \, d} {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right ) + 3 \, \sqrt {2} {\left (i \, b c d + 3 i \, a d^{2}\right )} \sqrt {i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (8 i \, c^{3} - 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) - 3 i \, d \sin \left (f x + e\right ) - 2 i \, c}{3 \, d}\right )\right ) + 3 \, \sqrt {2} {\left (-i \, b c d - 3 i \, a d^{2}\right )} \sqrt {-i \, d} {\rm weierstrassZeta}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, {\rm weierstrassPInverse}\left (-\frac {4 \, {\left (4 \, c^{2} - 3 \, d^{2}\right )}}{3 \, d^{2}}, -\frac {8 \, {\left (-8 i \, c^{3} + 9 i \, c d^{2}\right )}}{27 \, d^{3}}, \frac {3 \, d \cos \left (f x + e\right ) + 3 i \, d \sin \left (f x + e\right ) + 2 i \, c}{3 \, d}\right )\right )}{9 \, d^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (a + b \sin {\left (e + f x \right )}\right ) \sqrt {c + d \sin {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \left (a+b\,\sin \left (e+f\,x\right )\right )\,\sqrt {c+d\,\sin \left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________